﻿using System.Collections.Generic;
using System.Web.Http;
using AppService.Questionnaire;
using AppService.Questionnaire.Input;

namespace Internal_TB.Controllers
{
    public class QuestionnaireController : ApiController
    {
        QuestionnaireService _questionnaireService = new QuestionnaireService();

        [HttpGet]
        public IHttpActionResult Get()
        {
            return Ok(_questionnaireService.QueryQuestionnaire());
        }

        [HttpPost]
        public IHttpActionResult Post(QuestionnaireInput questionnaireInput)
        {
            return Ok(_questionnaireService.Save(questionnaireInput));
        }
    }
}
